<?
include_once('top.inc');
?>
<form action="<? echo $info['url']; ?>" method="post" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tr>
   
    
      
    <td width="51%"><strong>Название файла:</strong><br />
    <input name="name" id="name" type="text" class="inmed" value="<? echo $info['name']; ?>" />
      <i>Только латинские буквы и цифры! Без пробелов.</i><br /><br />
    </td>
    <td>
        <strong>Название:</strong><br />
        <textarea name="title" class="med" style="height:30px;"><? echo $info['title']; ?></textarea>
    </td>
  </tr>
  <tr>
    <td>
        <strong>Регалии:</strong><br />
        <textarea name="regals" class="med" style="height:50px;width:100%;"><? echo $info['regals']; ?></textarea><br/>
        <strong>Краткое описание:</strong><br />
        <textarea name="short" class="med" style="height:50px;width:100%;"><? echo $info['short']; ?></textarea>
    </td>
    <td>
            <div style="height:140px; position:relative; float:left; padding:0px;margin-top:0px; margin-right: 0px; width:110px; text-align: center; border:1px solid #cccccc;">
                <script type="text/javascript">
                  function ready(file){
                      jQuery("#image").html("<img src='/images/vrachi/<?=$info['id']?>---100.jpg' />");
                  }
                </script>
                <?
                    if (file_exists(LocalDir.'/images/vrachi/'.$info['id'].'---100.jpg'))
                        $img='<img src="/images/vrachi/'.$info['id'].'---100.jpg" />';
                    else
                        $img='<img src="/images/no-logo.jpg" width="110" />';
                ?>
                <span id="image" ><?=$img?></span>
                <div style="position:absolute; bottom: 5px; right: 5px;">
                    <span id="loader" ></span></div>
                <script type="text/javascript">
                    var flashvars = {
                            send_to: "/7ert54/process_files.php?vrach=<?=$info['id']?>",
                            endFunction: "ready",
                            file_desc:"*.jpg, *.png, *.gif",
                            file_ext:"*.jpg; *.png; *.gif"
                    };
                    var params = {
                            allowscriptaccess: "always",
                            allowFullScreen: "false",
                            wmode:'transparent',
                            name:"uploader"
                    };
                    var attributes = {
                            id: "uploader",
                            name:"uploader"
                    };
                    swfobject.embedSWF("/swf/upl.swf", "loader", "49px", "49px", "9.0.0", false, flashvars, params, attributes);
                    
                </script>
                
            </div> 
        
    </td>
  </tr>
  <tr>
    <td colspan="2"><strong>Контент:</strong>
    <script type="text/javascript">

function FCKeditor_OnComplete( editorInstance )
{
	editorInstance.Events.AttachEvent( 'OnBlur'	, FCKeditor_OnBlur ) ;
	editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
}

function FCKeditor_OnBlur( editorInstance )
{
	editorInstance.ToolbarSet.Collapse() ;
}

function FCKeditor_OnFocus( editorInstance )
{
	editorInstance.ToolbarSet.Expand() ;
}

	</script>
    <?$oFCKeditor = new FCKeditor('content') ;
$oFCKeditor->Height = '500';
$oFCKeditor->BasePath = '/7ert54/fckeditor/';
$oFCKeditor->Value = stripslashes($info['content']);
$oFCKeditor->Create() ; 
?></td>
    
  </tr>
 <tr><td>

 
 
 
 </td><td></td></tr>
</table>
<input type="submit" value="Сохранить">
</form>
